﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:viewModels="clr-namespace:EstimateTracker.ViewModels">
    
    <DataTemplate DataType="{x:Type viewModels:ReportSummaryViewModel}">
        <Grid>
            
            <Grid.RowDefinitions>
                <RowDefinition Height="10*"/>
                <RowDefinition Height="90*"/>
            </Grid.RowDefinitions>
            
            <DatePicker SelectedDate="{Binding SelectedDate,Mode=TwoWay}" Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Left"></DatePicker>
            <Button Content="Search" VerticalAlignment="Center" HorizontalAlignment="left" Margin="150,0,0,0" Command="{Binding Search}"/>

            <DataGrid Grid.Row="1" AutoGenerateColumns="False" ColumnWidth="100*" ItemsSource="{Binding DailySummaries}" IsReadOnly="True" SelectedItem="{Binding SelectedItem}">
                <DataGrid.Columns>
                    <DataGridTextColumn Header="Project" Binding="{Binding Project}"/>
                    <DataGridTextColumn Header="Activity" Binding="{Binding Activity}"/>
                    <DataGridTextColumn Header="Task" Binding="{Binding Task}"/>
                    <DataGridTextColumn Header="Estimate" Binding="{Binding EstimatedHours}"/>
                    <DataGridTextColumn Header="Actual" Binding="{Binding Actual}"/>
                </DataGrid.Columns>
            </DataGrid>
            
        </Grid>
    </DataTemplate>
    
</ResourceDictionary>